<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
Tentative Values
</TITLE>
</HEAD>
<BODY >
<A HREF="libman065.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman064.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman067.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc144">10.2</A>&nbsp;&nbsp;Tentative Values</H2><UL>
<LI><A HREF="libman066.html#toc80">Attaching and Retrieving Tentative Values</A>
<LI><A HREF="libman066.html#toc81">Tenability</A>
<LI><A HREF="libman066.html#toc82">The Tentative Assignment</A>
<LI><A HREF="libman066.html#toc83">Variables with No Tentative Value</A>
<LI><A HREF="libman066.html#toc84">Unification</A>
<LI><A HREF="libman066.html#toc85">Copying</A>
</UL>

<A NAME="@default370"></A>
<A NAME="toc80"></A>
<H3 CLASS="subsection"><A NAME="htoc145">10.2.1</A>&nbsp;&nbsp;Attaching and Retrieving Tentative Values</H3>
A problem variable may be associated with a tentative value.
Typically this tentative value is used to record preferred or 
previous assignments to this variable.<BR>
<BR>

<H4 CLASS="subsubsection">?Vars tent_set ++Values</H4>
<A NAME="tentset"></A>
Assigns tentative values for the variables in a term. These are
typically used to register values the variables are given in a partial
or initially inconsistent solution. These values may be changed
through later calls to the same predicate. Vars can be a variable, a
list of variables or any nonground term. Values must be a
corresponding ground term. The tentative values of the variables in
Vars are set to the corresponding ground values in Values.<BR>
<BR>

<H4 CLASS="subsubsection">?Vars tent_get ?Values</H4>
Query the variable's tentative values.
Values is a copy of the term Vars with the tentative values filled in
place of the variables. If a variable has no tentative value 
a variable is returned in its place.<BR>
<BR>
<A NAME="toc81"></A>
<H3 CLASS="subsection"><A NAME="htoc146">10.2.2</A>&nbsp;&nbsp;Tenability</H3>
<A NAME="@default371"></A>
A problem variable is <EM>tenable</EM> when it does not have a 
tentative value or when it has a tentative value that is
consistent e.g. with its finite domain. For example
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
[eclipse 3]: fd:(X::1..5), X tent_set 3.
X = X{fd:[1..5], repair:3}
</PRE></BLOCKQUOTE>
produces a tenable variable (note how the tentative value is printed
as the variable's repair-attribute), while on the other hand
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
[eclipse 3]: fd:(X::1..5), X tent_set 7.
X = X{fd:[1..5], repair:7}
</PRE></BLOCKQUOTE>
produces an untenable variable. Note that, unlike logical assignments,
the tentative value can be changed:
<BLOCKQUOTE CLASS="quote"><PRE CLASS="verbatim">
[eclipse 3]: fd:(X::1..5), X tent_set 7, X tent_set 3.
X = X{fd:[1..5], repair:3}
</PRE></BLOCKQUOTE>

<H4 CLASS="subsubsection">tenable(?Var)</H4>
Succeeds if the given variable is tenable. This predicate is the link
between repair and any underlying solver that maintains a domain for
a variable<SUP><A NAME="text8" HREF="libman064.html#note8">1</A></SUP>.<BR>
<BR>
<A NAME="toc82"></A>
<H3 CLASS="subsection"><A NAME="htoc147">10.2.3</A>&nbsp;&nbsp;The Tentative Assignment</H3>
<A NAME="@default372"></A>
The notion of a <EM>tentative assignment</EM> is the means of integration
with the consistency methods of ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>. The tentative assignment
is used for identifying whether a repair constraint is being violated.<BR>
<BR>
The tentative assignment is a function of the groundness and tenability of
problem variables according to the following table
<BR>

<DIV CLASS="center">
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD ALIGN=left NOWRAP><A NAME="table"></A>
Variable Groundness</TD>
<TD ALIGN=left NOWRAP>Variable Tenability</TD>
<TD ALIGN=left NOWRAP>Value in Tentative Assignment</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Ground</TD>
<TD ALIGN=left NOWRAP>Tenable</TD>
<TD ALIGN=left NOWRAP>Ground Value</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Ground</TD>
<TD ALIGN=left NOWRAP>Not Tenable</TD>
<TD ALIGN=left NOWRAP>Ground Value</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Not Ground</TD>
<TD ALIGN=left NOWRAP>Tenable</TD>
<TD ALIGN=left NOWRAP>Tentative Value</TD>
</TR>
<TR><TD ALIGN=left NOWRAP>Not Ground</TD>
<TD ALIGN=left NOWRAP>Not Tenable</TD>
<TD ALIGN=left NOWRAP>Undefined</TD>
</TR></TABLE>
</DIV>
<BR>

A repair constraint is violated under two conditions:
<UL CLASS="itemize"><LI CLASS="li-itemize">
The tentative assignment is undefined for any of its variables.
<LI CLASS="li-itemize">The constraint fails under the tentative assignment.
</UL>
<A NAME="toc83"></A>
<H3 CLASS="subsection"><A NAME="htoc148">10.2.4</A>&nbsp;&nbsp;Variables with No Tentative Value</H3>
It has been noted above that variables with no associated tentative value
are considered to be 
tenable. Since no single value has been selected as a tentative value,
the Repair library checks constraints for consistency with respect to the domain of 
that variable. A temporary variable with identical domains is substituted
in the constraint check. <BR>
<BR>
<A NAME="toc84"></A>
<H3 CLASS="subsection"><A NAME="htoc149">10.2.5</A>&nbsp;&nbsp;Unification</H3>
If two variables with distinct tentative values are unified only one
 is kept for the unified variable. Preference is given to a tentative
value that would result in a tenable unified variable.<BR>
<BR>
<A NAME="toc85"></A>
<H3 CLASS="subsection"><A NAME="htoc150">10.2.6</A>&nbsp;&nbsp;Copying</H3>
If a variable with a repair attribute is copied using
<A HREF="../bips/kernel/termmanip/copy_term-2.html"><B>copy_term/2</B></A><A NAME="@default373"></A>
or similar, the repair attribute is stripped. If you wish the copy to have
the same tentative value as the original, you will need to call
<A HREF="../bips/lib/repair/tent_get-2.html"><B>tent_get/2</B></A><A NAME="@default374"></A>
and
<A HREF="../bips/lib/repair/tent_set-2.html"><B>tent_set/2</B></A><A NAME="@default375"></A>
yourself.<BR>
<BR>
<HR>
<A HREF="libman065.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman064.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman067.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
